<link href="__PUBLIC__/plugins/fitui/tablegrid.css" rel="stylesheet">
<script src="__PUBLIC__/js/backend/format.js"></script>
<script src="__PUBLIC__/plugins/fitui/tablegrid.js"></script>
<script src="__PUBLIC__/js/backend/mer_goods.js"></script>
<script>
var Param = <?php echo json_encode( $param ) ?> ;
$(function(){
  MerGoods.init(<?php echo json_encode( $config ) ?>);
});

</script>

<div class="page-content">
  <ol class="breadcrumb">
    <li><a href="<?php echo $home_url ?>">首页</a></li>
    <li class="active"><?php echo $module_name ?></li>
  </ol>
  <div class="page-content-inner"> 
    <!-- read_modal -->
    <div class="portlet blue" id="read_modal"> 
      <!-- portlet-title -->
      <div class="portlet-title">
        <div class="caption"> <i class="fa fa-comments "></i> <?php echo $module_name ?> </div>
        <div class="tools"> <a href="<?php echo $module_url ?>?action=create" class="toolbtn add load_add_modal_btn" data-toggle="tooltip" data-placement="top" title="新增"></a> <a class="toolbtn reload" data-toggle="tooltip" data-placement="top" title="刷新"></a> </div>
      </div>
      <!-- end portlet-title -->
      <div class="portlet-body "> 
        <!-- table grid -->
        <div class="table-responsive">
          <table id="data_table" class="table table-striped table-hover table-condensed">
            <thead>
              <tr>
                <th width="80" data-field="id" data-sortable="true" >ID</th>
                <th width="80" data-field="mer_id"  >客户id</th>
                <th width="80" data-field="shop_type"  >商品类型</th>
                <th width="80" data-field="price"  >商品价格</th>
                <th width="80" data-field="ceiling_price"  >商品最高价格</th>
                <th width="80" data-field="status"  >商品状态</th>
                <th width="80" data-field="create_date"  >商品创建时间</th>
                <th width="80" data-field="release_date"  >商品发布时间</th>
                <th width="80" data-field="shelf_date"  >商品下架时间</th>
                <th width="80" data-field="jingle"  >广告词</th>
                <th width="80" data-field="brand_id"  >品牌id</th>
                <th width="80" data-field="promotion_price"  >商品促销价格</th>
                <th width="80" data-field="promotion_type"  >商品促销类型</th>
                <th width="80" data-field="marketprice"  >商品市场价格</th>
                <th width="80" data-field="storage_alarm"  >库存报警值</th>
                <th width="80" data-field="browse"  >浏览次数</th>
                <th width="80" data-field="salenum"  >销售次数</th>
                <th width="80" data-field="collect"  >收藏次数</th>
                <th width="80" data-field="spec"  >商品详情</th>
                <th width="80" data-field="storage"  >商品库存</th>
                <th width="80" data-field="image"  >主图</th>
                <th width="80" data-field="freight"  >运费</th>
                <th width="80" data-field="vat"  >是否开发票</th>
                <th width="80" data-field="commend"  >是否为推荐商品</th>
                <th width="80" data-field="good_star"  >商品评分</th>
                <th width="80" data-field="comment_count"  ></th>
                <th width="80" data-field="is_virtual"  >是否是虚拟商品</th>
                <th width="80" data-field="virtual_indate"  >虚拟商品过期时间</th>
                <th width="80" data-field="virtual_limit"  >虚拟商品购买数量限制 默认写0为不限</th>
                <th width="80" data-field="virtual_invalid_refund"  >是否允许过期退款</th>
                <th data-formatter="format_opt">操作</th>
                <th>&nbsp;</th>
              </tr>
            </thead>
          </table>
        </div>
        <!-- end table --> 
      </div>
    </div>
    <!-- end portlet read_modal --> 
    
    <!-- add_edit_modal  -->
    <div class="portlet" id="add_edit_modal" style="display:none;">
      <div class="portlet-title">
        <div class="caption"> <i class="fa fa-cogs"></i> <span id="action_label"></span> <?php echo $module_name ?> </div>
      </div>
      <div class="portlet-body ">
        <form id="submit_form" class="form-horizontal">
          <div class="form-group">
            <label class="col-sm-3 control-label">ID</label>
            <div class="col-sm-7">
              <input name="id" placeholder="ID" data-valid="required" data-tips="请填写正确的ID" type="text" class="form-control" >
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">客户id</label>
            <div class="col-sm-7">
              <input name="mer_id" placeholder="客户id" data-valid="required" data-tips="请填写正确的客户id" type="text" class="form-control" >
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">商品类型</label>
            <div class="col-sm-7">
              <input name="shop_type" placeholder="商品类型" data-valid="required" data-tips="请填写正确的商品类型" type="text" class="form-control" >
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">商品价格</label>
            <div class="col-sm-7">
              <input name="price" placeholder="商品价格" data-valid="required" data-tips="请填写正确的商品价格" type="text" class="form-control" >
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">商品最高价格</label>
            <div class="col-sm-7">
              <input name="ceiling_price" placeholder="商品最高价格" data-valid="required" data-tips="请填写正确的商品最高价格" type="text" class="form-control" >
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">商品状态</label>
            <div class="col-sm-7">
              <input name="status" placeholder="商品状态" data-valid="required" data-tips="请填写正确的商品状态" type="text" class="form-control" >
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">商品创建时间</label>
            <div class="col-sm-7">
              <input name="create_date" placeholder="商品创建时间" data-valid="required" data-tips="请填写正确的商品创建时间" type="text" class="form-control" >
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">商品发布时间</label>
            <div class="col-sm-7">
              <input name="release_date" placeholder="商品发布时间" data-valid="required" data-tips="请填写正确的商品发布时间" type="text" class="form-control" >
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">商品下架时间</label>
            <div class="col-sm-7">
              <input name="shelf_date" placeholder="商品下架时间" data-valid="required" data-tips="请填写正确的商品下架时间" type="text" class="form-control" >
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">广告词</label>
            <div class="col-sm-7">
              <input name="jingle" placeholder="广告词" data-valid="required" data-tips="请填写正确的广告词" type="text" class="form-control" >
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">品牌id</label>
            <div class="col-sm-7">
              <input name="brand_id" placeholder="品牌id" data-valid="required" data-tips="请填写正确的品牌id" type="text" class="form-control" >
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">商品促销价格</label>
            <div class="col-sm-7">
              <input name="promotion_price" placeholder="商品促销价格" data-valid="required" data-tips="请填写正确的商品促销价格" type="text" class="form-control" >
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">商品促销类型</label>
            <div class="col-sm-7">
              <input name="promotion_type" placeholder="商品促销类型" data-valid="required" data-tips="请填写正确的商品促销类型" type="text" class="form-control" >
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">商品市场价格</label>
            <div class="col-sm-7">
              <input name="marketprice" placeholder="商品市场价格" data-valid="required" data-tips="请填写正确的商品市场价格" type="text" class="form-control" >
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">库存报警值</label>
            <div class="col-sm-7">
              <input name="storage_alarm" placeholder="库存报警值" data-valid="required" data-tips="请填写正确的库存报警值" type="text" class="form-control" >
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">浏览次数</label>
            <div class="col-sm-7">
              <input name="browse" placeholder="浏览次数" data-valid="required" data-tips="请填写正确的浏览次数" type="text" class="form-control" >
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">销售次数</label>
            <div class="col-sm-7">
              <input name="salenum" placeholder="销售次数" data-valid="required" data-tips="请填写正确的销售次数" type="text" class="form-control" >
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">收藏次数</label>
            <div class="col-sm-7">
              <input name="collect" placeholder="收藏次数" data-valid="required" data-tips="请填写正确的收藏次数" type="text" class="form-control" >
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">商品详情</label>
            <div class="col-sm-7">
              <input name="spec" placeholder="商品详情" data-valid="required" data-tips="请填写正确的商品详情" type="text" class="form-control" >
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">商品库存</label>
            <div class="col-sm-7">
              <input name="storage" placeholder="商品库存" data-valid="required" data-tips="请填写正确的商品库存" type="text" class="form-control" >
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">主图</label>
            <div class="col-sm-7">
              <input name="image" placeholder="主图" data-valid="required" data-tips="请填写正确的主图" type="text" class="form-control" >
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">运费</label>
            <div class="col-sm-7">
              <input name="freight" placeholder="运费" data-valid="required" data-tips="请填写正确的运费" type="text" class="form-control" >
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">是否开发票</label>
            <div class="col-sm-7">
              <input name="vat" placeholder="是否开发票" data-valid="required" data-tips="请填写正确的是否开发票" type="text" class="form-control" >
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">是否为推荐商品</label>
            <div class="col-sm-7">
              <input name="commend" placeholder="是否为推荐商品" data-valid="required" data-tips="请填写正确的是否为推荐商品" type="text" class="form-control" >
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">商品评分</label>
            <div class="col-sm-7">
              <input name="good_star" placeholder="商品评分" data-valid="required" data-tips="请填写正确的商品评分" type="text" class="form-control" >
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label"></label>
            <div class="col-sm-7">
              <input name="comment_count" placeholder="" data-valid="required" data-tips="请填写正确的" type="text" class="form-control" >
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">是否是虚拟商品</label>
            <div class="col-sm-7">
              <input name="is_virtual" placeholder="是否是虚拟商品" data-valid="required" data-tips="请填写正确的是否是虚拟商品" type="text" class="form-control" >
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">虚拟商品过期时间</label>
            <div class="col-sm-7">
              <input name="virtual_indate" placeholder="虚拟商品过期时间" data-valid="required" data-tips="请填写正确的虚拟商品过期时间" type="text" class="form-control" >
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">虚拟商品购买数量限制 默认写0为不限</label>
            <div class="col-sm-7">
              <input name="virtual_limit" placeholder="虚拟商品购买数量限制 默认写0为不限" data-valid="required" data-tips="请填写正确的虚拟商品购买数量限制 默认写0为不限" type="text" class="form-control" >
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">是否允许过期退款</label>
            <div class="col-sm-7">
              <input name="virtual_invalid_refund" placeholder="是否允许过期退款" data-valid="required" data-tips="请填写正确的是否允许过期退款" type="text" class="form-control" >
            </div>
          </div>
          <hr>
          <div class="row">
            <div class="col-md-12" style="text-align:center">
              <button class="btn btn-default btn-lg " id="add_edit_close_btn" type="button"><i class="fa fa-arrow-left"></i> 返回</button>
              <button class="btn btn-danger btn-lg " id="submit_btn" type="button"><i class="fa fa-edit"></i> 提交</button>
            </div>
          </div>
        </form>
      </div>
    </div>
    <!-- end portlet add_edit_modal --> 
  </div>
  <!-- end page-content-inner --> 
</div>
